1. Field of the Invention
This invention is related to the field of volume management on storage devices and, more particularly, to recovering a previous state of a volume.
2. Description of the Related Art
Computer systems have been responsible for large productivity increases, as well as providing new and exciting functionality for users to experience in both work and leisure capacities. Crucial to the usefulness and functionality of computer systems is the computer data that is stored on various storage devices within, or accessible to, the systems. Computer data (or simply “data”) is being used to refer generically to data manipulated by the computer systems and instructions (e.g. software) executed by the computer systems.
Computer data can be corrupted or otherwise lost in a variety of fashions. For example, user error is frequently a source of corruption/data loss. Computer systems are particularly sensitive to errors made by users having administrative privileges (often referred to as “administrators”) because such users can change important computer system configuration, including operating system configuration, that the computer system relies on for operation. Other sources of data corruption/loss may include hardware or software failures in one or more computer systems; malicious operation such as viruses, worms, “hacker” intrusions, etc.; environmental events such as power failures, accident, natural disaster, intentionally-caused disaster, etc.
To protect against data corruption/loss, various data protection mechanisms have been employed. For example, data backup, replication, and snapshot mechanisms are often used (either at the filesystem level or the logical volume level) to make a copy of the data that corresponds to a given point in time. However, the data protection mechanisms are costly, both in terms of physical resources consumed and the elapsed time to implement the copying. A given copy becomes out of date almost immediately (because original data continues being changed by the computer system). Due to the cost and time constraints, immediately making another copy using the above mechanisms is not feasible.
The VERITAS Volume Manager™ (VxVM) available from VERITAS Software Corporation (Mountain View, Calif.) implements a flexible snapshotting feature called FlashSnap. If a mirrored volume is created (that is, a volume that spans at least two physical storage devices and a copy of each datum in the volume is stored on each of the physical storage devices), a physical storage device may be “broken off” (disconnected from the volume) to permit a backup copy to be made (e.g. a snapshot). The break off can also happen involuntarily due to a software or hardware failure that makes said storage device inaccessible for a period of time. While the physical storage device is broken off, FlashSnap keeps a scoreboard of write operations to the mirrored volume at a selectable level of granularity (some multiple of the block size). Granularities may be, e.g., 64 kilobytes or 1 Megabyte. After the physical storage device is reattached, the write operations are applied to the physical storage device to sync its state to the state of the volume.